static gboolean
_ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
int bootversion,
+ GPtrArray *new_deployments,
GCancellable *cancellable,
GError **error)
{
if (use_system_grub2_mkconfig && ostree_sysroot_get_booted_deployment (self->sysroot) == NULL
&& g_file_has_parent (self->sysroot->path, NULL))
{
- g_autoptr(GPtrArray) deployments = NULL;
OstreeDeployment *tool_deployment;
g_autoptr(GFile) tool_deployment_root = NULL;
- deployments = ostree_sysroot_get_deployments (self->sysroot);
-
- g_assert_cmpint (deployments->len, >, 0);
-
- tool_deployment = deployments->pdata[0];
+ g_assert_cmpint (new_deployments->len, >, 0);
+ tool_deployment = new_deployments->pdata[0];
/* Sadly we have to execute code to generate the bootloader configuration.
* If we're in a booted deployment, we just don't chroot.
grub2_mkconfig_chroot = g_file_get_path (tool_deployment_root);
}
+ g_debug ("Using grub2-mkconfig chroot: %s\n", grub2_mkconfig_chroot);
+
g_autoptr(GFile) new_config_path = NULL;
g_autoptr(GFile) config_path_efi_dir = NULL;
if (self->is_efi)
}
static gboolean
-_ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
- int bootversion,
- GCancellable *cancellable,
- GError **error)
+_ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
+ int bootversion,
+ GPtrArray *new_deployments,
+ GCancellable *cancellable,
+ GError **error)
{
OstreeBootloaderSyslinux *self = OSTREE_BOOTLOADER_SYSLINUX (bootloader);
}
static gboolean
-_ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
- int bootversion,
- GCancellable *cancellable,
- GError **error)
+_ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
+ int bootversion,
+ GPtrArray *new_deployments,
+ GCancellable *cancellable,
+ GError **error)
{
OstreeBootloaderUboot *self = OSTREE_BOOTLOADER_UBOOT (bootloader);
gboolean
_ostree_bootloader_write_config (OstreeBootloader *self,
int bootversion,
+ GPtrArray *new_deployments,
GCancellable *cancellable,
GError **error)
{
g_return_val_if_fail (OSTREE_IS_BOOTLOADER (self), FALSE);
- return OSTREE_BOOTLOADER_GET_IFACE (self)->write_config (self, bootversion,
- cancellable, error);
+ return OSTREE_BOOTLOADER_GET_IFACE (self)->write_config (self, bootversion,
+ new_deployments,
+ cancellable, error);
}
gboolean
const char * (* get_name) (OstreeBootloader *self);
gboolean (* write_config) (OstreeBootloader *self,
int bootversion,
+ GPtrArray *new_deployments,
GCancellable *cancellable,
GError **error);
gboolean (* is_atomic) (OstreeBootloader *self);
gboolean _ostree_bootloader_write_config (OstreeBootloader *self,
int bootversion,
+ GPtrArray *new_deployments,
GCancellable *cancellable,
GError **error);
if (bootloader)
{
if (!_ostree_bootloader_write_config (bootloader, new_bootversion,
- cancellable, error))
+ new_deployments, cancellable,
+ error))
return glnx_prefix_error (error, "Bootloader write config");
}